use std::sync::LazyLock;

use ironrdp_pdu::gcc::{Monitor, MonitorFlags};
use ironrdp_pdu::geometry::InclusiveRectangle;
use ironrdp_pdu::rdp::vc::dvc::gfx::{
    Avc420BitmapStream, Avc444BitmapStream, CacheImportReplyPdu, CacheToSurfacePdu, CapabilitiesAdvertisePdu,
    CapabilitiesConfirmPdu, CapabilitiesV103Flags, CapabilitiesV104Flags, CapabilitiesV10Flags, CapabilitiesV81Flags,
    CapabilitiesV8Flags, CapabilitySet, Codec1Type, Codec2Type, Color, CreateSurfacePdu, DeleteEncodingContextPdu,
    DeleteSurfacePdu, Encoding, EndFramePdu, EvictCacheEntryPdu, FrameAcknowledgePdu, MapSurfaceToOutputPdu,
    PixelFormat, Point, QuantQuality, QueueDepth, ResetGraphicsPdu, SolidFillPdu, StartFramePdu, SurfaceToCachePdu,
    SurfaceToSurfacePdu, Timestamp, WireToSurface1Pdu, WireToSurface2Pdu,
};

pub const WIRE_TO_SURFACE_1_BUFFER: [u8; 218] = [
    0x00, 0x00, 0x08, 0x00, 0x20, 0xa5, 0x03, 0xde, 0x02, 0xab, 0x03, 0xe7, 0x02, 0xc9, 0x00, 0x00, 0x00, 0x01, 0x0e,
    0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00,
    0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x3f, 0x27, 0x19, 0x82, 0x72, 0x69, 0x40, 0x28, 0x1a, 0x3f, 0x27,
    0x19, 0x40, 0x28, 0x1a, 0x41, 0x29, 0x1b, 0x4f, 0x39, 0x2c, 0xa0, 0x94, 0x8d, 0xc0, 0xb8, 0xb3, 0x00, 0x09, 0xd8,
    0xd3, 0xd0, 0x97, 0x8a, 0x82, 0x40, 0x28, 0x1a, 0x41, 0x29, 0x1b, 0x3f, 0x27, 0x19, 0x4f, 0x39, 0x2c, 0xdf, 0xdb,
    0xd9, 0xd8, 0xd3, 0xd0, 0xff, 0xff, 0xff, 0x00, 0x09, 0xff, 0xff, 0xff, 0x3f, 0x27, 0x19, 0x41, 0x29, 0x1b, 0x40,
    0x28, 0x1a, 0x40, 0x28, 0x1a, 0xe5, 0xe1, 0xe0, 0x81, 0x71, 0x68, 0x40, 0x28, 0x1a, 0xff, 0xff, 0xff, 0x00, 0x09,
    0xff, 0xff, 0xff, 0x60, 0x4b, 0x40, 0x4f, 0x39, 0x2c, 0x60, 0x4b, 0x40, 0xd8, 0xd3, 0xd0, 0xc0, 0xb8, 0xb3, 0x43,
    0x2b, 0x1d, 0x3f, 0x27, 0x19, 0xff, 0xff, 0xff, 0x00, 0x09, 0xc0, 0xb8, 0xb3, 0xef, 0xed, 0xeb, 0xdf, 0xdb, 0xd9,
    0xea, 0xe7, 0xe6, 0xc0, 0xb8, 0xb3, 0x41, 0x29, 0x1b, 0x41, 0x29, 0x1b, 0x42, 0x2a, 0x1c, 0xff, 0xff, 0xff, 0x00,
    0x09, 0x41, 0x29, 0x1b, 0x81, 0x71, 0x68, 0x80, 0x71, 0x67, 0x5f, 0x4b, 0x3f, 0x40, 0x28, 0x1a, 0x42, 0x2a, 0x1c,
    0x40, 0x28, 0x1a, 0x3f, 0x27, 0x19, 0xc0, 0xb8, 0xb3,
];

pub const WIRE_TO_SURFACE_2_BUFFER: [u8; 629] = [
    0x00, 0x00, 0x09, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x68, 0x02, 0x00, 0x00, 0xc1, 0xcc, 0x0c, 0x00, 0x00, 0x00,
    0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc4, 0xcc, 0x56, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02,
    0x00, 0x37, 0x02, 0x00, 0x00, 0x63, 0x02, 0x51, 0x01, 0x45, 0x00, 0x29, 0x00, 0x66, 0x76, 0x88, 0x99, 0xa9, 0xc6,
    0xcc, 0x53, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x05, 0x00, 0x01, 0xff, 0x9a, 0x00, 0x4a, 0x00, 0x58,
    0x00, 0x00, 0x00, 0x00, 0x09, 0x91, 0x02, 0xc6, 0xd9, 0x08, 0x8c, 0x99, 0x11, 0xb3, 0xc9, 0x0f, 0x88, 0x8d, 0x99,
    0x1b, 0x32, 0x36, 0x64, 0x6c, 0xc8, 0xd9, 0x91, 0xb3, 0x23, 0x66, 0x46, 0xcc, 0x8d, 0x99, 0x1b, 0x32, 0x36, 0x64,
    0x6c, 0xc8, 0xd9, 0x91, 0xb3, 0x23, 0x66, 0x46, 0xc0, 0x0b, 0x3a, 0x05, 0x02, 0x82, 0x85, 0x14, 0x52, 0xaa, 0xaf,
    0xa0, 0x00, 0x06, 0x4e, 0x0d, 0x4e, 0x87, 0xe8, 0xfa, 0x38, 0x81, 0x5c, 0x42, 0xf1, 0x11, 0x44, 0x8f, 0x8f, 0xc5,
    0xe2, 0xf0, 0x32, 0x20, 0x66, 0x8a, 0x55, 0x55, 0x00, 0x03, 0x19, 0x29, 0x00, 0x05, 0xee, 0x85, 0x49, 0xe8, 0xaa,
    0x77, 0xf5, 0x97, 0x8b, 0xda, 0x20, 0x80, 0x52, 0x8a, 0x27, 0x0f, 0x77, 0x70, 0x01, 0x4b, 0x54, 0x53, 0x4e, 0x00,
    0x78, 0x64, 0x8a, 0x16, 0x27, 0xe8, 0x5f, 0xbf, 0xff, 0xff, 0x00, 0x05, 0x1e, 0x50, 0xf7, 0xfe, 0x80, 0x02, 0x87,
    0x64, 0x1c, 0xf6, 0x00, 0x0a, 0x3b, 0x43, 0x9f, 0xe8, 0x00, 0x29, 0xe4, 0x86, 0xff, 0x80, 0x00, 0xa3, 0x68, 0x6f,
    0xf0, 0x00, 0x32, 0x23, 0x00, 0x00, 0x09, 0xa1, 0x78, 0xf8, 0x5c, 0x2e, 0x1e, 0x1e, 0x0b, 0x0f, 0x05, 0x87, 0x82,
    0xc3, 0xc1, 0x61, 0xe0, 0xb0, 0x01, 0x5e, 0x01, 0xf3, 0x53, 0x01, 0x0f, 0x23, 0xc0, 0x93, 0x90, 0x4a, 0x06, 0x80,
    0x49, 0x4f, 0x42, 0x91, 0x16, 0x1a, 0x40, 0x14, 0x41, 0x0a, 0x00, 0xa9, 0x24, 0x40, 0x4f, 0x78, 0x9a, 0x28, 0x35,
    0x49, 0xef, 0x83, 0xc4, 0xfb, 0xf8, 0x0f, 0x13, 0xdf, 0x03, 0xda, 0xff, 0xf5, 0x80, 0x74, 0x27, 0xb4, 0x0e, 0x5f,
    0xea, 0x0c, 0x90, 0x00, 0x0a, 0xc1, 0x78, 0xf8, 0x5c, 0x2e, 0x1e, 0x1e, 0x0b, 0x0f, 0x05, 0x87, 0x82, 0xc3, 0xc1,
    0x61, 0xe0, 0xb0, 0xf0, 0x58, 0x3d, 0x00, 0x61, 0x90, 0x04, 0x02, 0x02, 0x04, 0x08, 0x21, 0x90, 0xd8, 0x00, 0x00,
    0x3f, 0x62, 0x0a, 0x3a, 0x04, 0x11, 0x08, 0xd0, 0x89, 0x15, 0xd4, 0x8c, 0x4b, 0x4f, 0x09, 0xa5, 0x2a, 0x10, 0x8d,
    0x80, 0x1a, 0xd1, 0xa5, 0x60, 0x0c, 0xe8, 0x11, 0x41, 0x1b, 0x2b, 0xe1, 0x1f, 0xfe, 0x43, 0xff, 0x81, 0x8f, 0x84,
    0x3d, 0x08, 0x1f, 0xf8, 0x87, 0xa0, 0x9a, 0x85, 0xf0, 0x27, 0x42, 0x7f, 0x01, 0xe6, 0x80, 0xc6, 0xcc, 0xe4, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0x00, 0x01, 0xff, 0x82, 0x00, 0x1d, 0x00, 0x2e, 0x00, 0x00, 0x00,
    0x00, 0x0a, 0xe8, 0x1c, 0xc8, 0x87, 0xe8, 0x0d, 0x01, 0xa0, 0x68, 0x34, 0x34, 0x34, 0x69, 0xad, 0x6e, 0xeb, 0x6d,
    0xb6, 0x80, 0x00, 0x0c, 0x64, 0x1b, 0x0d, 0x0f, 0xa3, 0xe8, 0xfa, 0x7d, 0x7d, 0xfb, 0xf3, 0xe7, 0xc5, 0xc0, 0xa4,
    0x81, 0x02, 0x48, 0x44, 0x6c, 0x09, 0xad, 0xd7, 0x55, 0x70, 0x00, 0x18, 0x48, 0x08, 0x10, 0x41, 0x04, 0x20, 0x00,
    0x15, 0xfd, 0x00, 0x9b, 0xd0, 0x2d, 0xe8, 0x38, 0x9d, 0x02, 0xf4, 0x0b, 0xc7, 0x05, 0x34, 0x69, 0xbf, 0x78, 0x80,
    0xb2, 0xed, 0xd4, 0x00, 0x61, 0xd0, 0xe8, 0xb2, 0xcb, 0x00, 0x01, 0x01, 0xc2, 0x0b, 0x42, 0xa2, 0xff, 0xe2, 0x17,
    0xff, 0xec, 0x01, 0xfe, 0x48, 0x04, 0xff, 0x14, 0x10, 0xfe, 0x40, 0x09, 0x7f, 0x12, 0x00, 0xe6, 0x20, 0x0f, 0xd4,
    0x80, 0x7e, 0xc0, 0x39, 0xfa, 0x90, 0x0f, 0xb0, 0x0e, 0x3d, 0x48, 0x46, 0x88, 0x0b, 0xa4, 0x00, 0x00, 0x00, 0x1d,
    0x66, 0x40, 0x34, 0x02, 0x87, 0xa0, 0x25, 0x9a, 0x01, 0x21, 0x0a, 0x48, 0x91, 0x49, 0x44, 0x28, 0x88, 0x43, 0xbc,
    0x84, 0x2c, 0x42, 0x38, 0x56, 0x0b, 0x00, 0x00, 0x00, 0x1b, 0xfc, 0x40, 0xe4, 0x1c, 0x87, 0x21, 0xca, 0x95, 0x04,
    0x08, 0x10, 0x42, 0x18, 0xc0, 0x09, 0x68, 0xa5, 0x54, 0x00, 0x61, 0x40, 0xe6, 0x97, 0xcd, 0xee, 0xcf, 0xb8, 0x3f,
    0xf1, 0x23, 0xa8, 0x7f, 0x86, 0x1a, 0x8f, 0xf0, 0x2c, 0x49, 0x88, 0xbe, 0x16, 0xc5, 0xe0, 0xc2, 0xcc, 0x06, 0x00,
    0x00, 0x00,
];

pub const DELETE_ENCODING_CONTEXT_BUFFER: [u8; 6] = [0x00, 0x00, 0x01, 0x00, 0x00, 0x00];

pub const SOLID_FILL_BUFFER: [u8; 16] = [
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00,
];

pub const SURFACE_TO_SURFACE_BUFFER: [u8; 18] = [
    0x00, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x3c, 0x00, 0xa4, 0x02, 0x94, 0x00, 0x01, 0x00, 0x80, 0x00, 0x3c, 0x00,
];

pub const SURFACE_TO_CACHE_BUFFER: [u8; 20] = [
    0x00, 0x00, 0xb7, 0x7f, 0xa3, 0xa6, 0xda, 0x86, 0x3d, 0x11, 0x0e, 0x00, 0x80, 0x02, 0x00, 0x00, 0xc0, 0x02, 0x40,
    0x00,
];

pub const CACHE_TO_SURFACE_BUFFER: [u8; 10] = [0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x40, 0x01];

pub const CREATE_SURFACE_BUFFER: [u8; 7] = [0x00, 0x00, 0x00, 0x04, 0x00, 0x03, 0x21];

pub const DELETE_SURFACE_BUFFER: [u8; 2] = [0x00, 0x00];

pub const RESET_GRAPHICS_BUFFER: [u8; 332] = [
    0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];

pub const MAP_SURFACE_TO_OUTPUT_BUFFER: [u8; 12] =
    [0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2, 0x00, 0x00, 0x00];

pub const EVICT_CACHE_ENTRY_BUFFER: [u8; 2] = [0x00, 0x00];

pub const START_FRAME_BUFFER: [u8; 8] = [0xf7, 0xe8, 0x9b, 0x5, 0x05, 0x00, 0x00, 0x00];

pub const END_FRAME_BUFFER: [u8; 4] = [0x01, 0x00, 0x00, 0x00];

pub const CAPABILITIES_CONFIRM_BUFFER: [u8; 12] =
    [0x02, 0x05, 0x0a, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00];

pub const CAPABILITIES_ADVERTISE_BUFFER: [u8; 122] = [
    0x9, 0x0, 0x4, 0x0, 0x8, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x5, 0x1, 0x8, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1,
    0x0, 0x0, 0x0, 0x2, 0x0, 0xa, 0x0, 0x4, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0, 0x0, 0x1, 0xa, 0x0, 0x10, 0x0, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0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 0x3b, 0x3, 0x3c, 0x3, 0x3d, 0x3, 0x3e, 0x3, 0x3f, 0x3, 0x40, 0x3, 0x41, 0x3, 0x42,
    0x3, 0x43, 0x3, 0x44, 0x3, 0x45, 0x3, 0x46, 0x3, 0x47, 0x3, 0x48, 0x3, 0x49, 0x3, 0x4a, 0x3, 0x4b, 0x3, 0x4c, 0x3,
    0x4d, 0x3, 0x4e, 0x3, 0x4f, 0x3, 0x50, 0x3, 0x51, 0x3, 0x52, 0x3, 0x53, 0x3, 0x54, 0x3, 0x55, 0x3, 0x56, 0x3, 0x57,
    0x3, 0x58, 0x3, 0x59, 0x3, 0x5a, 0x3, 0x5b, 0x3, 0x5c, 0x3, 0x5d, 0x3, 0x5e, 0x3, 0x5f, 0x3, 0x60, 0x3, 0x61, 0x3,
    0x62, 0x3, 0x63, 0x3, 0x64, 0x3, 0x65, 0x3, 0x66, 0x3, 0x67, 0x3, 0x68, 0x3, 0x69, 0x3, 0x6a, 0x3, 0x6b, 0x3, 0x6c,
    0x3, 0x6d, 0x3, 0x6e, 0x3, 0x6f, 0x3, 0x70, 0x3, 0x71, 0x3, 0x72, 0x3, 0x73, 0x3, 0x74, 0x3, 0x75, 0x3, 0x76, 0x3,
    0x77, 0x3, 0x78, 0x3, 0x79, 0x3, 0x7a, 0x3, 0x7b, 0x3, 0x7c, 0x3, 0x7d, 0x3, 0x7e, 0x3, 0x7f, 0x3, 0x80, 0x3, 0x81,
    0x3, 0x82, 0x3, 0x83, 0x3, 0x84, 0x3, 0x85, 0x3, 0x86, 0x3, 0x87, 0x3, 0x88, 0x3, 0x89, 0x3, 0x8a, 0x3, 0x8b, 0x3,
    0x8c, 0x3, 0x8d, 0x3, 0x8e, 0x3, 0x8f, 0x3, 0x90, 0x3, 0x91, 0x3, 0x92, 0x3, 0x93, 0x3, 0x94, 0x3, 0x95, 0x3, 0x96,
    0x3, 0x97, 0x3, 0x98, 0x3,
];

pub const AVC_444_MESSAGE_INCORRECT_LEN: [u8; 88] = [
    0x0, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x0, 0x0, 0x7, 0x20, 0x4, 0x10, 0x7, 0x30, 0x4, 0x16, 0x64, 0x0, 0x0, 0x0, 0x1,
    0x61, 0x9a, 0x11, 0xda, 0x24, 0xea, 0x25, 0x0, 0x1f, 0xe6, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0x3f, 0xc9, 0xa1, 0x1d,
    0xa2, 0x4e, 0xa2, 0x50, 0x1, 0xfe, 0x60, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0x1f, 0xe2, 0x68, 0x47, 0x68, 0x93, 0xa8,
    0x94, 0x0, 0x7f, 0x98, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0xb, 0xf4, 0x9a, 0x11, 0xda, 0x24, 0xea, 0x25, 0x0, 0x1d,
    0xe7, 0x97, 0xab, 0x80, 0x80, 0x80,
];

pub const AVC_444_MESSAGE_CORRECT_LEN: [u8; 88] = [
    0x54, 0x0, 0x0, 0x80, 0x1, 0x0, 0x0, 0x0, 0x0, 0x7, 0x20, 0x4, 0x10, 0x7, 0x30, 0x4, 0x16, 0x64, 0x0, 0x0, 0x0,
    0x1, 0x61, 0x9a, 0x11, 0xda, 0x24, 0xea, 0x25, 0x0, 0x1f, 0xe6, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0x3f, 0xc9, 0xa1,
    0x1d, 0xa2, 0x4e, 0xa2, 0x50, 0x1, 0xfe, 0x60, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0x1f, 0xe2, 0x68, 0x47, 0x68, 0x93,
    0xa8, 0x94, 0x0, 0x7f, 0x98, 0x0, 0x0, 0x0, 0x1, 0x61, 0x0, 0xb, 0xf4, 0x9a, 0x11, 0xda, 0x24, 0xea, 0x25, 0x0,
    0x1d, 0xe7, 0x97, 0xab, 0x80, 0x80, 0x80,
];

pub static WIRE_TO_SURFACE_1: LazyLock<WireToSurface1Pdu> = LazyLock::new(|| WireToSurface1Pdu {
    surface_id: 0,
    codec_id: Codec1Type::ClearCodec,
    pixel_format: PixelFormat::XRgb,
    destination_rectangle: InclusiveRectangle {
        left: 933,
        top: 734,
        right: 939,
        bottom: 743,
    },
    bitmap_data: WIRE_TO_SURFACE_1_BUFFER[17..].to_vec(),
});
pub static WIRE_TO_SURFACE_1_BITMAP_DATA: LazyLock<Vec<u8>> = LazyLock::new(|| WIRE_TO_SURFACE_1_BUFFER[17..].to_vec());
pub static WIRE_TO_SURFACE_2: LazyLock<WireToSurface2Pdu> = LazyLock::new(|| WireToSurface2Pdu {
    surface_id: 0,
    codec_id: Codec2Type::RemoteFxProgressive,
    codec_context_id: 4,
    pixel_format: PixelFormat::XRgb,
    bitmap_data: WIRE_TO_SURFACE_2_BUFFER[13..].to_vec(),
});
pub static WIRE_TO_SURFACE_2_BITMAP_DATA: LazyLock<Vec<u8>> = LazyLock::new(|| WIRE_TO_SURFACE_2_BUFFER[13..].to_vec());
pub static DELETE_ENCODING_CONTEXT: LazyLock<DeleteEncodingContextPdu> = LazyLock::new(|| DeleteEncodingContextPdu {
    surface_id: 0,
    codec_context_id: 1,
});
pub static SOLID_FILL: LazyLock<SolidFillPdu> = LazyLock::new(|| SolidFillPdu {
    surface_id: 0,
    fill_pixel: Color {
        b: 0,
        g: 0,
        r: 0,
        xa: 0,
    },
    rectangles: vec![InclusiveRectangle {
        left: 0,
        top: 0,
        right: 64,
        bottom: 64,
    }],
});
pub static SURFACE_TO_SURFACE: LazyLock<SurfaceToSurfacePdu> = LazyLock::new(|| SurfaceToSurfacePdu {
    source_surface_id: 0,
    destination_surface_id: 0,
    source_rectangle: InclusiveRectangle {
        left: 200,
        top: 60,
        right: 676,
        bottom: 148,
    },
    destination_points: vec![Point { x: 128, y: 60 }],
});
pub static SURFACE_TO_CACHE: LazyLock<SurfaceToCachePdu> = LazyLock::new(|| SurfaceToCachePdu {
    surface_id: 0,
    cache_key: 0x113D_86DA_A6A3_7FB7,
    cache_slot: 14,
    source_rectangle: InclusiveRectangle {
        left: 640,
        top: 0,
        right: 704,
        bottom: 64,
    },
});
pub static CACHE_TO_SURFACE: LazyLock<CacheToSurfacePdu> = LazyLock::new(|| CacheToSurfacePdu {
    cache_slot: 2,
    surface_id: 0,
    destination_points: vec![Point { x: 768, y: 320 }],
});
pub static CREATE_SURFACE: LazyLock<CreateSurfacePdu> = LazyLock::new(|| CreateSurfacePdu {
    surface_id: 0,
    width: 1024,
    height: 768,
    pixel_format: PixelFormat::ARgb,
});
pub static DELETE_SURFACE: LazyLock<DeleteSurfacePdu> = LazyLock::new(|| DeleteSurfacePdu { surface_id: 0 });
pub static RESET_GRAPHICS: LazyLock<ResetGraphicsPdu> = LazyLock::new(|| ResetGraphicsPdu {
    width: 1024,
    height: 768,
    monitors: vec![Monitor {
        left: 0,
        top: 0,
        right: 1023,
        bottom: 767,
        flags: MonitorFlags::PRIMARY,
    }],
});
pub static MAP_SURFACE_TO_OUTPUT: LazyLock<MapSurfaceToOutputPdu> = LazyLock::new(|| MapSurfaceToOutputPdu {
    surface_id: 0,
    output_origin_x: 1,
    output_origin_y: 2,
});
pub static EVICT_CACHE_ENTRY: LazyLock<EvictCacheEntryPdu> = LazyLock::new(|| EvictCacheEntryPdu { cache_slot: 0 });
pub static START_FRAME: LazyLock<StartFramePdu> = LazyLock::new(|| StartFramePdu {
    timestamp: Timestamp {
        milliseconds: 247,
        seconds: 58,
        minutes: 27,
        hours: 22,
    },
    frame_id: 5,
});
pub static END_FRAME: LazyLock<EndFramePdu> = LazyLock::new(|| EndFramePdu { frame_id: 1 });
pub static CAPABILITIES_CONFIRM: LazyLock<CapabilitiesConfirmPdu> = LazyLock::new(|| {
    CapabilitiesConfirmPdu(CapabilitySet::V10_5 {
        flags: CapabilitiesV104Flags::AVC_DISABLED,
    })
});
pub static CAPABILITIES_ADVERTISE: LazyLock<CapabilitiesAdvertisePdu> = LazyLock::new(|| {
    CapabilitiesAdvertisePdu(vec![
        CapabilitySet::V8 {
            flags: CapabilitiesV8Flags::THIN_CLIENT,
        },
        CapabilitySet::V8_1 {
            flags: CapabilitiesV81Flags::THIN_CLIENT,
        },
        CapabilitySet::V10 {
            flags: CapabilitiesV10Flags::AVC_DISABLED,
        },
        CapabilitySet::V10_1,
        CapabilitySet::V10_2 {
            flags: CapabilitiesV10Flags::AVC_DISABLED,
        },
        CapabilitySet::V10_3 {
            flags: CapabilitiesV103Flags::AVC_DISABLED,
        },
        CapabilitySet::V10_4 {
            flags: CapabilitiesV104Flags::AVC_DISABLED,
        },
        CapabilitySet::V10_5 {
            flags: CapabilitiesV104Flags::AVC_DISABLED,
        },
        CapabilitySet::V10_6 {
            flags: CapabilitiesV104Flags::AVC_DISABLED,
        },
    ])
});
pub static FRAME_ACKNOWLEDGE: LazyLock<FrameAcknowledgePdu> = LazyLock::new(|| FrameAcknowledgePdu {
    queue_depth: QueueDepth::Unavailable,
    frame_id: 1,
    total_frames_decoded: 1,
});
pub static CACHE_IMPORT_REPLY: LazyLock<CacheImportReplyPdu> = LazyLock::new(|| CacheImportReplyPdu {
    cache_slots: vec![
        0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
        0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28,
        0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a,
        0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
        0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
        0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,
        0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82,
        0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
        0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
        0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8,
        0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca,
        0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc,
        0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee,
        0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x100,
        0x101, 0x102, 0x103, 0x104, 0x105, 0x106, 0x107, 0x108, 0x109, 0x10a, 0x10b, 0x10c, 0x10d, 0x10e, 0x10f, 0x110,
        0x111, 0x112, 0x113, 0x114, 0x115, 0x116, 0x117, 0x118, 0x119, 0x11a, 0x11b, 0x11c, 0x11d, 0x11e, 0x11f, 0x120,
        0x121, 0x122, 0x123, 0x124, 0x125, 0x126, 0x127, 0x128, 0x129, 0x12a, 0x12b, 0x12c, 0x12d, 0x12e, 0x12f, 0x130,
        0x131, 0x132, 0x133, 0x134, 0x135, 0x136, 0x137, 0x138, 0x139, 0x13a, 0x13b, 0x13c, 0x13d, 0x13e, 0x13f, 0x140,
        0x141, 0x142, 0x143, 0x144, 0x145, 0x146, 0x147, 0x148, 0x149, 0x14a, 0x14b, 0x14c, 0x14d, 0x14e, 0x14f, 0x150,
        0x151, 0x152, 0x153, 0x154, 0x155, 0x156, 0x157, 0x158, 0x159, 0x15a, 0x15b, 0x15c, 0x15d, 0x15e, 0x15f, 0x160,
        0x161, 0x162, 0x163, 0x164, 0x165, 0x166, 0x167, 0x168, 0x169, 0x16a, 0x16b, 0x16c, 0x16d, 0x16e, 0x16f, 0x170,
        0x171, 0x172, 0x173, 0x174, 0x175, 0x176, 0x177, 0x178, 0x179, 0x17a, 0x17b, 0x17c, 0x17d, 0x17e, 0x17f, 0x180,
        0x181, 0x182, 0x183, 0x184, 0x185, 0x186, 0x187, 0x188, 0x189, 0x18a, 0x18b, 0x18c, 0x18d, 0x18e, 0x18f, 0x190,
        0x191, 0x192, 0x193, 0x194, 0x195, 0x196, 0x197, 0x198, 0x199, 0x19a, 0x19b, 0x19c, 0x19d, 0x19e, 0x19f, 0x1a0,
        0x1a1, 0x1a2, 0x1a3, 0x1a4, 0x1a5, 0x1a6, 0x1a7, 0x1a8, 0x1a9, 0x1aa, 0x1ab, 0x1ac, 0x1ad, 0x1ae, 0x1af, 0x1b0,
        0x1b1, 0x1b2, 0x1b3, 0x1b4, 0x1b5, 0x1b6, 0x1b7, 0x1b8, 0x1b9, 0x1ba, 0x1bb, 0x1bc, 0x1bd, 0x1be, 0x1bf, 0x1c0,
        0x1c1, 0x1c2, 0x1c3, 0x1c4, 0x1c5, 0x1c6, 0x1c7, 0x1c8, 0x1c9, 0x1ca, 0x1cb, 0x1cc, 0x1cd, 0x1ce, 0x1cf, 0x1d0,
        0x1d1, 0x1d2, 0x1d3, 0x1d4, 0x1d5, 0x1d6, 0x1d7, 0x1d8, 0x1d9, 0x1da, 0x1db, 0x1dc, 0x1dd, 0x1de, 0x1df, 0x1e0,
        0x1e1, 0x1e2, 0x1e3, 0x1e4, 0x1e5, 0x1e6, 0x1e7, 0x1e8, 0x1e9, 0x1ea, 0x1eb, 0x1ec, 0x1ed, 0x1ee, 0x1ef, 0x1f0,
        0x1f1, 0x1f2, 0x1f3, 0x1f4, 0x1f5, 0x1f6, 0x1f7, 0x1f8, 0x1f9, 0x1fa, 0x1fb, 0x1fc, 0x1fd, 0x1fe, 0x1ff, 0x200,
        0x201, 0x202, 0x203, 0x204, 0x205, 0x206, 0x207, 0x208, 0x209, 0x20a, 0x20b, 0x20c, 0x20d, 0x20e, 0x20f, 0x210,
        0x211, 0x212, 0x213, 0x214, 0x215, 0x216, 0x217, 0x218, 0x219, 0x21a, 0x21b, 0x21c, 0x21d, 0x21e, 0x21f, 0x220,
        0x221, 0x222, 0x223, 0x224, 0x225, 0x226, 0x227, 0x228, 0x229, 0x22a, 0x22b, 0x22c, 0x22d, 0x22e, 0x22f, 0x230,
        0x231, 0x232, 0x233, 0x234, 0x235, 0x236, 0x237, 0x238, 0x239, 0x23a, 0x23b, 0x23c, 0x23d, 0x23e, 0x23f, 0x240,
        0x241, 0x242, 0x243, 0x244, 0x245, 0x246, 0x247, 0x248, 0x249, 0x24a, 0x24b, 0x24c, 0x24d, 0x24e, 0x24f, 0x250,
        0x251, 0x252, 0x253, 0x254, 0x255, 0x256, 0x257, 0x258, 0x259, 0x25a, 0x25b, 0x25c, 0x25d, 0x25e, 0x25f, 0x260,
        0x261, 0x262, 0x263, 0x264, 0x265, 0x266, 0x267, 0x268, 0x269, 0x26a, 0x26b, 0x26c, 0x26d, 0x26e, 0x26f, 0x270,
        0x271, 0x272, 0x273, 0x274, 0x275, 0x276, 0x277, 0x278, 0x279, 0x27a, 0x27b, 0x27c, 0x27d, 0x27e, 0x27f, 0x280,
        0x281, 0x282, 0x283, 0x284, 0x285, 0x286, 0x287, 0x288, 0x289, 0x28a, 0x28b, 0x28c, 0x28d, 0x28e, 0x28f, 0x290,
        0x291, 0x292, 0x293, 0x294, 0x295, 0x296, 0x297, 0x298, 0x299, 0x29a, 0x29b, 0x29c, 0x29d, 0x29e, 0x29f, 0x2a0,
        0x2a1, 0x2a2, 0x2a3, 0x2a4, 0x2a5, 0x2a6, 0x2a7, 0x2a8, 0x2a9, 0x2aa, 0x2ab, 0x2ac, 0x2ad, 0x2ae, 0x2af, 0x2b0,
        0x2b1, 0x2b2, 0x2b3, 0x2b4, 0x2b5, 0x2b6, 0x2b7, 0x2b8, 0x2b9, 0x2ba, 0x2bb, 0x2bc, 0x2bd, 0x2be, 0x2bf, 0x2c0,
        0x2c1, 0x2c2, 0x2c3, 0x2c4, 0x2c5, 0x2c6, 0x2c7, 0x2c8, 0x2c9, 0x2ca, 0x2cb, 0x2cc, 0x2cd, 0x2ce, 0x2cf, 0x2d0,
        0x2d1, 0x2d2, 0x2d3, 0x2d4, 0x2d5, 0x2d6, 0x2d7, 0x2d8, 0x2d9, 0x2da, 0x2db, 0x2dc, 0x2dd, 0x2de, 0x2df, 0x2e0,
        0x2e1, 0x2e2, 0x2e3, 0x2e4, 0x2e5, 0x2e6, 0x2e7, 0x2e8, 0x2e9, 0x2ea, 0x2eb, 0x2ec, 0x2ed, 0x2ee, 0x2ef, 0x2f0,
        0x2f1, 0x2f2, 0x2f3, 0x2f4, 0x2f5, 0x2f6, 0x2f7, 0x2f8, 0x2f9, 0x2fa, 0x2fb, 0x2fc, 0x2fd, 0x2fe, 0x2ff, 0x300,
        0x301, 0x302, 0x303, 0x304, 0x305, 0x306, 0x307, 0x308, 0x309, 0x30a, 0x30b, 0x30c, 0x30d, 0x30e, 0x30f, 0x310,
        0x311, 0x312, 0x313, 0x314, 0x315, 0x316, 0x317, 0x318, 0x319, 0x31a, 0x31b, 0x31c, 0x31d, 0x31e, 0x31f, 0x320,
        0x321, 0x322, 0x323, 0x324, 0x325, 0x326, 0x327, 0x328, 0x329, 0x32a, 0x32b, 0x32c, 0x32d, 0x32e, 0x32f, 0x330,
        0x331, 0x332, 0x333, 0x334, 0x335, 0x336, 0x337, 0x338, 0x339, 0x33a, 0x33b, 0x33c, 0x33d, 0x33e, 0x33f, 0x340,
        0x341, 0x342, 0x343, 0x344, 0x345, 0x346, 0x347, 0x348, 0x349, 0x34a, 0x34b, 0x34c, 0x34d, 0x34e, 0x34f, 0x350,
        0x351, 0x352, 0x353, 0x354, 0x355, 0x356, 0x357, 0x358, 0x359, 0x35a, 0x35b, 0x35c, 0x35d, 0x35e, 0x35f, 0x360,
        0x361, 0x362, 0x363, 0x364, 0x365, 0x366, 0x367, 0x368, 0x369, 0x36a, 0x36b, 0x36c, 0x36d, 0x36e, 0x36f, 0x370,
        0x371, 0x372, 0x373, 0x374, 0x375, 0x376, 0x377, 0x378, 0x379, 0x37a, 0x37b, 0x37c, 0x37d, 0x37e, 0x37f, 0x380,
        0x381, 0x382, 0x383, 0x384, 0x385, 0x386, 0x387, 0x388, 0x389, 0x38a, 0x38b, 0x38c, 0x38d, 0x38e, 0x38f, 0x390,
        0x391, 0x392, 0x393, 0x394, 0x395, 0x396, 0x397, 0x398,
    ],
});
pub static AVC_444_BITMAP: LazyLock<Avc444BitmapStream<'static>> = LazyLock::new(|| Avc444BitmapStream {
    encoding: Encoding::CHROMA,
    stream1: Avc420BitmapStream {
        rectangles: vec![InclusiveRectangle {
            left: 1792,
            top: 1056,
            right: 1808,
            bottom: 1072,
        }],
        quant_qual_vals: vec![QuantQuality {
            quantization_parameter: 22,
            progressive: false,
            quality: 100,
        }],
        data: &AVC_444_MESSAGE_CORRECT_LEN[18..],
    },
    stream2: None,
});
